<template>
  <div>
    子组件
    <grandson-component />
  </div>
</template>

<script>
import GrandsonComponent from "./GrandsonComponent.vue";
export default {
  components: { GrandsonComponent },
  name: "ChildComponent",
  // 1. 接受父级传递的值
  props: {
    value: {
      type: String,
      default: "",
    },
  },
  methods: {
    input(event) {
      this.$emit("input", event.target.value);
    },
  },
};
</script>
